﻿using LpbPrj.Client.Data;
using System.Windows;

namespace LpbPrj.Client.Views
{
    public partial class AboutWindow
    {
        public AboutWindow()
        {
            InitializeComponent();

            DataContext = this;
            CopyRight = VersionHelper.GetCopyright();
            Version = VersionHelper.GetVersion();
            FontName = GlobalData.Config.Font;
            SoftTitle = GlobalData.Config.SoftTitle;
        }


        public string FontName { get => (string)GetValue(FontNameProperty); set => SetValue(FontNameProperty, value); }
        public static readonly DependencyProperty FontNameProperty = DependencyProperty.Register(nameof(FontName), typeof(string), typeof(AboutWindow), new PropertyMetadata(default(string)));

        public string SoftTitle { get => (string)GetValue(SoftTitleProperty); set => SetValue(SoftTitleProperty, value); }
        public static readonly DependencyProperty SoftTitleProperty = DependencyProperty.Register(nameof(SoftTitle), typeof(string), typeof(AboutWindow), new PropertyMetadata(default(string)));

        public string CopyRight { get => (string)GetValue(CopyRightProperty); set => SetValue(CopyRightProperty, value); }
        public static readonly DependencyProperty CopyRightProperty = DependencyProperty.Register(nameof(CopyRight), typeof(string), typeof(AboutWindow), new PropertyMetadata(default(string)));

        public string Version { get => (string)GetValue(VersionProperty); set => SetValue(VersionProperty, value); }
        public static readonly DependencyProperty VersionProperty = DependencyProperty.Register(nameof(Version), typeof(string), typeof(AboutWindow), new PropertyMetadata(default(string)));

    }
}
